import { FC, ReactNode } from 'react';
import { Typography, Space } from 'antd';

const { Title } = Typography;

interface PageTitleProps {
  title: string;
  extra?: ReactNode;
}

const PageTitle: FC<PageTitleProps> = ({ title, extra }) => {
  return (
    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24 }}>
      <Title level={4} style={{ margin: 0 }}>{title}</Title>
      {extra && <Space>{extra}</Space>}
    </div>
  );
};

export default PageTitle; 